﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlUpdateInvoDateNotClosed.ascx.cs" Inherits="WebUserControl_ControlUpdateInvoDateNotClosed" %>
<%@ Import Namespace="BCDataCenter" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register src="uscTitleForm.ascx" tagname="uscTitleForm" tagprefix="uc1" %>
<%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc1" %>
<link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/datePicker.css")%>' type="text/css" />

 <script type="text/javascript">
     function pageLoad() {
    
       $(function()
     {
	    $("#<%= txtNgayHoaDon.ClientID %>").datePicker(
		{
			clickInput:true,
			startDate: '01/01/1970',
			endDate: (new Date()).asString()
		}
	);
});
       $("#<%= ImgRequest.ClientID %>").click(function() {
       
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
             } }); 
       
        });
        
        $("#<%= btMove.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
        
         
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        }  
   
</script>  
 
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<uc1:uscTitleForm ID="uscTitleForm1" runat="server" Messeage="Sửa ngày hóa đơn chưa chốt" />
<uc1:uscMsgBox ID="uscMsgBox1"  runat="server" />
<table>
  <tr>
    <td>TTPP</td>
    <td>
      <asp:DropDownList  width="200px" ID="DropTTPP"  runat="server" AutoPostBack="true" 
            onselectedindexchanged="DropTTPP_SelectedIndexChanged">
    </asp:DropDownList>
    </td>
    <td></td>
    <td></td>
  </tr>
   <tr>
    <td colspan="2">Các hóa đơn chưa chốt</td>
    <td></td>
    <td>
     <asp:ImageButton ID="ImgRequest" runat="server"   Height="25px" Width="25px" 
            ImageUrl="~/image/Symbol-Refresh.png"    ToolTip="Cập nhật lại" 
            onclick="ImgRequest_Click" />
    </td>
  </tr>
  </table>
  <fieldset>
  
      <asp:GridView ID="GridView1" AutoGenerateColumns="False" runat="server" 
          onrowcommand="GridView1_RowCommand" CellPadding="4" ForeColor="#333333" 
          GridLines="None">
          <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
      <Columns>
                       <asp:BoundField DataField="SoHD" HeaderText="Số HĐ" ReadOnly="True" />
                       <asp:BoundField DataField="TenTVV" ItemStyle-HorizontalAlign="Left" HeaderText="Tư vấn viên" ReadOnly="True" />
                       <asp:BoundField DataField="Ngay" ReadOnly="True" HeaderText="Ngày" />
                       <asp:BoundField DataField="TienHD" ItemStyle-HorizontalAlign="Right" ReadOnly="True" DataFormatString="{0:###,###}"  HeaderText="Tiền HĐ" />
                       <asp:TemplateField>
                            <HeaderTemplate>
                                <asp:CheckBox ID="CheckAll" onclick="SelectAllCheckboxes(this);" runat="server" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="CheckItem" Checked='<%# Eval("Chon") %>' runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
      </Columns>
          <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
          <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
          <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
          <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
          <AlternatingRowStyle BackColor="White" />
      </asp:GridView>
  
  </fieldset>
  <div><span>&nbsp;sang ngày&nbsp;</span>
    <span>
      <asp:TextBox ID="txtNgayHoaDon" width="100px"  runat="server"></asp:TextBox>
                              &nbsp;
    <asp:Button ID="btMove" runat="server" Text="Chuyển ngày hóa đơn" onclick="btMove_Click"/>
    </span>
    
</ContentTemplate>
</asp:UpdatePanel>